package com.dragon.modules.yuegou.query.merchant;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.merchant.MerchantThemeEntity;
import com.dragon.modules.yuegou.enums.merchant.MerchantThemeStatus;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 商家主题 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-09-23 15:32:57
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class MerchantThemeQuery extends MerchantThemeEntity implements Query<MerchantThemeEntity>{

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商户ID查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

    /** 主题ID查询条件 */
	@JsonUnwrapped(prefix = "themeId")
	private Condition<String> themeIdCondition;

    /** 主题名称查询条件 */
	@JsonUnwrapped(prefix = "themeName")
	private Condition<String> themeNameCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 创建者查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 更新时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** 更新人ID查询条件 */
	@JsonUnwrapped(prefix = "modifiedBy")
	private Condition<String> modifiedByCondition;

    /** [枚举]状态：0-无效-INVALID、1-有效-VALID查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<MerchantThemeStatus> statusCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public MerchantThemeQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public MerchantThemeQuery(MerchantThemeEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public MerchantThemeQuery(MerchantThemeQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.themeIdCondition != null) {
			this.themeIdCondition = other.themeIdCondition.copy();
		}
		if(other.themeNameCondition != null) {
			this.themeNameCondition = other.themeNameCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.modifiedByCondition != null) {
			this.modifiedByCondition = other.modifiedByCondition.copy();
		}
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
	}

	@Override
	public QueryWrapper<MerchantThemeEntity> toQueryWrapper() {
		QueryWrapper<MerchantThemeEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (themeIdCondition != null) {
			themeIdCondition.toWrapper(wrapper, COL_THEME_ID);
		}
		if (themeNameCondition != null) {
			themeNameCondition.toWrapper(wrapper, COL_THEME_NAME);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (modifiedByCondition != null) {
			modifiedByCondition.toWrapper(wrapper, COL_MODIFIED_BY);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商户ID查询条件
	 * 
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}
	
	/**
	 * 获取商户ID查询条件
	 * 
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置商户ID查询条件
	 * 
	 * @param merchantIdCondition 商户ID查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回主题ID查询条件
	 * 
	 * @return themeIdCondition 主题ID查询条件
	 */
	public Condition<String> themeId() {
		this.themeIdCondition = new Condition<>();
		return this.themeIdCondition;
	}
	
	/**
	 * 获取主题ID查询条件
	 * 
	 * @return themeIdCondition 主题ID查询条件
	 */
	public Condition<String> getThemeIdCondition() {
		return themeIdCondition;
	}

	/**
	 * 设置主题ID查询条件
	 * 
	 * @param themeIdCondition 主题ID查询条件
	 */
	public void setThemeIdCondition(Condition<String> themeIdCondition) {
		this.themeIdCondition = themeIdCondition;
	}

	/**
	 * 构造并返回主题名称查询条件
	 * 
	 * @return themeNameCondition 主题名称查询条件
	 */
	public Condition<String> themeName() {
		this.themeNameCondition = new Condition<>();
		return this.themeNameCondition;
	}
	
	/**
	 * 获取主题名称查询条件
	 * 
	 * @return themeNameCondition 主题名称查询条件
	 */
	public Condition<String> getThemeNameCondition() {
		return themeNameCondition;
	}

	/**
	 * 设置主题名称查询条件
	 * 
	 * @param themeNameCondition 主题名称查询条件
	 */
	public void setThemeNameCondition(Condition<String> themeNameCondition) {
		this.themeNameCondition = themeNameCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回创建者查询条件
	 * 
	 * @return createdByCondition 创建者查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取创建者查询条件
	 * 
	 * @return createdByCondition 创建者查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建者查询条件
	 * 
	 * @param createdByCondition 创建者查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回更新时间查询条件
	 * 
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取更新时间查询条件
	 * 
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置更新时间查询条件
	 * 
	 * @param modifiedTimeCondition 更新时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回更新人ID查询条件
	 * 
	 * @return modifiedByCondition 更新人ID查询条件
	 */
	public Condition<String> modifiedBy() {
		this.modifiedByCondition = new Condition<>();
		return this.modifiedByCondition;
	}
	
	/**
	 * 获取更新人ID查询条件
	 * 
	 * @return modifiedByCondition 更新人ID查询条件
	 */
	public Condition<String> getModifiedByCondition() {
		return modifiedByCondition;
	}

	/**
	 * 设置更新人ID查询条件
	 * 
	 * @param modifiedByCondition 更新人ID查询条件
	 */
	public void setModifiedByCondition(Condition<String> modifiedByCondition) {
		this.modifiedByCondition = modifiedByCondition;
	}

	/**
	 * 构造并返回[枚举]状态：0-无效-INVALID、1-有效-VALID查询条件
	 * 
	 * @return statusCondition [枚举]状态：0-无效-INVALID、1-有效-VALID查询条件
	 */
	public Condition<MerchantThemeStatus> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}
	
	/**
	 * 获取[枚举]状态：0-无效-INVALID、1-有效-VALID查询条件
	 * 
	 * @return statusCondition [枚举]状态：0-无效-INVALID、1-有效-VALID查询条件
	 */
	public Condition<MerchantThemeStatus> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置[枚举]状态：0-无效-INVALID、1-有效-VALID查询条件
	 * 
	 * @param statusCondition [枚举]状态：0-无效-INVALID、1-有效-VALID查询条件
	 */
	public void setStatusCondition(Condition<MerchantThemeStatus> statusCondition) {
		this.statusCondition = statusCondition;
	}

}
